package observer2;

public class Principal {

	/**
	 * @param args
	 * @throws InterruptedException 
	 */
	public static void main(String[] args) throws InterruptedException {
		MiObservable miObservable = new MiObservable();
		miObservable.addObserver(new Log());
		SalvarLog salvarLog = new SalvarLog();
		miObservable.addObserver(salvarLog);
		miObservable.evento("Test 1");
		Thread.sleep(1000);
		miObservable.evento("Test 2");
		miObservable.removeObserver(salvarLog);
		miObservable.evento("Test 3");
	}

}
